package com.spring.springLearn.aop;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface AnnoTest {
    LogAopOper logAopOper() default LogAopOper.SysUserLogin;
    
    String type() default "";
    
    String info() default "";

    public enum LogAopOper {
        SysUserLogin("service01", "用户登录"),
        SysAccessOrgUrl("service02", "访问机构菜单"),
        SysAccessUserUrl("service03", "访问用户菜单");

        /**
         * 操作类型
         */
        private String operType;

        /**
         * 操作信息
         */
        private String operInfo;

        private LogAopOper(String operType, String operInfo) {
            this.operType = operType;
            this.operInfo = operInfo;
        }

        public String getOperType() {
            return operType;
        }

        public void setOperType(String operType) {
            this.operType = operType;
        }

        public String getOperInfo() {
            return operInfo;
        }

        public void setOperInfo(String operInfo) {
            this.operInfo = operInfo;
        }

    }

}
